package com.test.demo;

import org.junit.Test;

/**
 * ${DESCRIPTION}
 *
 * @author muxiaoyu
 * @create 2017/05/16 8:57
 **/
public class ProxyDemo {
    public static void main(String[] args) {
        Dog dog = new Dog();
        DogProxy dogProxy = new DogProxy(dog);
        dogProxy.doSay();
    }

    @Test
    public void test1() {
        RunTimeProxy runTimeProxy = new RunTimeProxy();
        DogInterface dogInterface = (DogInterface) runTimeProxy.bind(new Dog());
        dogInterface.Say();
    }
}
